package com.ytkj.tradeserver.service.impl;

import com.github.pagehelper.PageHelper;
import com.ytkj.tradeserver.dao.IAppInfoDao;
import com.ytkj.tradeserver.entity.AppInfo;
import com.ytkj.tradeserver.model.PageBean;
import com.ytkj.tradeserver.service.iservice.IAppInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by Administrator on 2017/3/18.
 */
@Service
public class AppInfoImpl implements IAppInfoService {

    @Resource
    IAppInfoDao appInfoDao;

    public int insert(AppInfo record){
      return appInfoDao.insert(record);
    }

    public PageBean<AppInfo> queryAllAppInfo(String url,AppInfo record,PageBean pageBean){
        PageHelper.startPage(pageBean.getPageNum(), pageBean.getPageSize());
        List<AppInfo> list = appInfoDao.queryAllAppInfo(record);
        return new PageBean<>(list,url);
    }
}
